using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

using Peradigm.Framework.Domain.Security;
using Peradigm.Framework.Persistence;
using Peradigm.Framework.Domain.Parties;

namespace Liberty.Domain.CaseManagement
{
    [Serializable]
    public class CaseVolunteer : User
    {
        #region Constants
        #endregion

        #region Event Handlers
        #endregion

        #region Methods
        public CaseVolunteer AddCase( Case newCase )
        {
            if( !i_Cases.Contains( newCase ) )
            {
                i_Cases.Add( newCase );
            }
            return this;
        }

        public CaseVolunteer AddCases( IEnumerable<Case> cases )
        {
            foreach( Case aCase in cases )
            {
                this.AddCase( aCase );
            }
            return this;
        }

        /// <summary>
        /// Creates a stubbed case volunteer populated with frequently used primitives.
        /// Other aggregated objects are not populated by this factory method.
        /// </summary>
        /// <returns></returns>
        public static CaseVolunteer TestInstance()
        {
            CaseVolunteer stub = new CaseVolunteer( 3L, "Tanya", "Romankova" );

            stub.Pedigree = "R.N.";
            stub.Title = "Volunteer";

            return stub;
        }
        #endregion

        #region Properties
	    public IEnumerable<Case> Cases
	    {
		    get 
		    { 
			    return i_Cases;
		    }
	    }
        #endregion

        #region Private Methods
        #endregion

        #region Private Properties
        #endregion

        #region Construction and Finalization
        public CaseVolunteer( long oid, string firstName, string lastName )
            : base( oid, firstName, lastName )
        {
            
        }
        #endregion

        #region Data Elements
        private List<Case> i_Cases = new List<Case>();
        #endregion

    }
}